<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 菲波那切数列
    // 参数：正整数
    // 返回值：对应的整数位置的菲波那切数列的值
    function fibo(a) {
      if (a === 1 || a === 2) {
        return 1;
      } else {
        return fibo(a - 1) + fibo(a - 2);
      }
    }
    // 调用函数
    console.log(fibo(1));
    console.log(fibo(2));
    console.log(fibo(3));
    console.log(fibo(4));
    console.log(fibo(5));
    console.log(fibo(6));
  </script>
</head>
<body>
  
</body>
</html>